The growth and popularity of computer applications and the Internet is due, in large part, to the vast improvements in the user experience of computers in general. Advances in graphics capabilities, processing speed, and transmission bandwidth have allowed the creation of applications and websites that provide the user rich graphical, interactive, and useful experiences. Graphical application development environments (GADEs), such as Adobe Incorporated Inc.'s FLASH®, FLEX®, and FLEX BUILDER®, Borland Software Corporation's DELPHI®, and the like, provide an environment for application developers to create and code complex graphically-driven applications.
In the development of a graphical application, the author or developer typically uses graphical tools to draw objects that may be later used as repeatable symbols, components, and the like. When used in an animation or movie, it may be desirable to allow the graphical object to change in size, shape, or both. There are many different methods for allowing for such graphical objects to change sizes and shapes. One such method that has been used in web design is dividing the graphical object into nine sections by slicing it with a grid comprising two sets of perpendicularly intersecting parallel lines. Specific ones of the resulting nine sections of the object are then scaled and/or transformed according to the section of the grid in which they are located. The corner sections of the grid are typically not scaled. The remaining sections are scaled in some manner to achieve the desired transformation of the overall object. Once these remaining sections are scaled the corner sections may be transformed and/or translated as necessary to end up adjacent to the remaining sections of the object. This transformation may include some scaling; however, scaling is rarely performed on the corners. This approach to creating size/shape-variable graphics is generally referred to as “nine slicing,” “nine slice scaling,” “scale nine,” or “slice nine.”
In order to implement nine slice scaling when developing a graphics-driven application, the developer graphically drags a grid on the object, but must then program all of the appropriate and/or desired scaling and transform code modules for each section of the grid. While this process may provides the desired scaling, it typically takes a great deal of time, effort, and expert programming and mathematics skills for the author to code the transformation matrices for each object being scaled and/or transformed. Moreover, when a developer is designing scalable components, they typically code everything about the component, including the graphics, without the use of grids or even the source graphics. Conventional graphics tools do not provide automated solutions to this problem because of the arbitrary complexity of the possible shapes that can be involved. Furthermore, the nine slice grid lines need not be symmetrical about any particular axis of the object, which can make any attempt to automate the process highly complex to implement.
In many GADEs, vector graphics are available for representing the various graphical objects. Vector graphics use geometrical primitives such as points, lines, curves, and polygons, which are all based upon mathematical equations to represent images in computer graphics. Vector graphics are often used because they can typically be moved, scaled, rotated, filled, and the like without degrading the quality of a drawing. Many vector graphics are represented by quadratic Bézier curves, which generally use three control points to define a curve: two end points and a third control point. When using vector graphics, an automated solution to nine slice scaling may be easier to implement because of the way such graphics are represented mathematically rather than by mapped bits. However, because the control points for each individual vector may not be within the same region, programming a scaling transformation module that will consistently affect the entire vector as it spans the different sections is computationally complex, which would be impractical to automate due to the near infinite possible object shapes, grid patterns, and combinations thereof that may be used.
An alternative that provides an easier means to automate a slice nine scaling is to render a bitmap of the object, if necessary, and then simply magnifying the bitmap using conventional magnification techniques. This approach may be handled automatically, but generally results in a less-pleasing graphical effect, because the magnification of the edges and corners of the object typically become noticeably altered. For example, an object with rounded corners that is magnified in this fashion can result in a “jagged” appearance. Therefore, while providing more of a means to automate a slice nine scaling technique, the results would actually diminish the user experience making it an undesirable process.